import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {TurboperHistory} from '../../../../entity/turboper-history.model';
import {ApplicationService} from '../../../../service/application.service';

@Component({
  selector: 'app-overhaul-table',
  templateUrl: './overhaul-table.component.html',
  styleUrls: ['./overhaul-table.component.css']
})
export class OverhaulTableComponent implements OnInit {
  @Input() turboperHistorys: TurboperHistory[];
  selectTurboperHistory: TurboperHistory;
  @Output() emitSelectHistory = new EventEmitter<TurboperHistory>();
  /**
   * 倍率
   *
   * @public
   * @type {number}@memberof OverhaulTableComponent
   */
  public ratio: number = 1;

  constructor(
    private application: ApplicationService,
  ) {
  }

  ngOnInit() {
    if (this.application.currentApplicationParams && this.application.currentApplicationParams['ratio']) {
      this.ratio = Number(this.application.currentApplicationParams['ratio'].paramValue);
    }
  }

  emitSelector() {
    this.emitSelectHistory.emit(this.selectTurboperHistory)
  }

}


// WEBPACK FOOTER //
// ./src/app/module/data-analysis/farm-overhaul/overhaul-table/overhaul-table.component.ts
